local liuan = fk.CreateSkill {
    name = "cf_firemode_liuanhuaming",
    tags = { Skill.Compulsory },
}


liuan:addEffect(fk.AfterCardsMove, {
    anim_type = "drawcard",
    can_trigger = function(self, event, target, player, data)
        if player:hasSkill(self) and player.phase == Player.NotActive and player:usedSkillTimes(self.name) < 2 then
            for _, move in ipairs(data) do
                if move.from == player and (move.to ~= player or (move.toArea ~= Card.PlayerHand and move.toArea ~= Card.PlayerEquip)) then
                    for _, info in ipairs(move.moveInfo) do
                        if (info.fromArea == Card.PlayerHand or info.fromArea == Card.PlayerEquip) then
                            return true
                        end
                    end
                end
            end
        end
    end,
    on_use = function(self, event, target, player, data)
        player:drawCards(1, self.name)
    end,

})

Fk:loadTranslationTable {
    ["cf_firemode_liuanhuaming"] = "柳暗花明",
    [":cf_firemode_liuanhuaming"] = "锁定技，每回合限两次，你于回合外失去牌时，摸一张牌",
}

return liuan
